#ifndef PARAMETER_H
#define PARAMETER_H

#include <QString>

#include "node.h"
#include "type.h"

class Parameter : public Node
{
public:
    Parameter(const QString& name, const Type& type, const YYLTYPE& loc);

    QString name() const { return m_name; }
    QString jsName() const;

    bool isIndex() const { return m_isIndex; }
    void setIsIndex() { m_isIndex = true; }

    virtual Type type() { return m_type; }

private:
    QString m_name;
    Type m_type;
    bool m_isIndex;
};

#endif // PARAMETER_H
